/**
 * Copyright &copy; 2012-2017 <a href="https://vivo.com">vivo</a> All rights reserved.
 */
package com.vivo.employee.entity;

import org.hibernate.validator.constraints.Length;
import com.thinkgem.jeesite.modules.sys.entity.Office;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.thinkgem.jeesite.common.utils.excel.annotation.ExcelField;

import com.thinkgem.jeesite.common.persistence.DataEntity;

/**
 * 请假列表Entity
 * @author jyangye
 * @version 2018-01-14
 */
public class ViEmpLeaveList extends DataEntity<ViEmpLeaveList> {
	
	private static final long serialVersionUID = 1L;
	private String employeeId;		// 员工ID
	private Office comp;		// 组织机构
	private Office dept;		// 部门
	private Office post;		// 职位
	private String name;		// 姓名
	private String code;		// 身份证号
	private String title;		// 标题
	private String type;		// 请假类型
	private Date startTime;		// 请假开始时间
	private Date endTime;		// 请假结束时间
	private Double leaveDays;		// 请假时长（天）
	private Double useHolidayDays;		// 所使用年假天数
	private String reason;		// 请假事由

    private String errMsg;

    private String leaveId;
	
	public ViEmpLeaveList() {
		super();
	}

	public ViEmpLeaveList(String id){
		super(id);
	}

	public String getEmployeeId() {
		return employeeId;
	}

	public void setEmployeeId(String employeeId) {
		this.employeeId = employeeId;
	}

	public Office getComp() {
		return comp;
	}

	public void setComp(Office comp) {
		this.comp = comp;
	}
	
	@ExcelField(title="部门", align=2, type = 1, sort=40)
	public Office getDept() {
		return dept;
	}

	public void setDept(Office dept) {
		this.dept = dept;
	}
	
	@ExcelField(title="职位", align=2, type = 1, sort=50)
	public Office getPost() {
		return post;
	}

	public void setPost(Office post) {
		this.post = post;
	}
	
	@Length(min=0, max=16, message="姓名长度必须介于 0 和 16 之间")
	@ExcelField(title="姓名", align=2, sort=60)
	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
	
	@Length(min=0, max=32, message="身份证号长度必须介于 0 和 32 之间")
	@ExcelField(title="*身份证号", align=2, sort=70, isText = true)
	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}


	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}
	
	@Length(min=0, max=32, message="请假类型长度必须介于 0 和 32 之间")
	@ExcelField(title="*请假类型", align=2, sort=90)
	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
	@ExcelField(title="*请假开始时间", align=2, sort=100)
	public Date getStartTime() {
		return startTime;
	}

	public void setStartTime(Date startTime) {
		this.startTime = startTime;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
	@ExcelField(title="*请假结束时间", align=2, sort=110)
	public Date getEndTime() {
		return endTime;
	}

	public void setEndTime(Date endTime) {
		this.endTime = endTime;
	}
	
	@ExcelField(title="*请假时长（天）", align=2, sort=120)
	public Double getLeaveDays() {
		return leaveDays;
	}

	public void setLeaveDays(Double leaveDays) {
		this.leaveDays = leaveDays;
	}
	
	@ExcelField(title="所使用年假天数", align=2, sort=130)
	public Double getUseHolidayDays() {
		return useHolidayDays;
	}

	public void setUseHolidayDays(Double useHolidayDays) {
		this.useHolidayDays = useHolidayDays;
	}
	
	@Length(min=0, max=64, message="请假事由长度必须介于 0 和 64 之间")
	@ExcelField(title="请假事由", align=2, sort=140)
	public String getReason() {
		return reason;
	}

	public void setReason(String reason) {
		this.reason = reason;
	}


    public String getLeaveId() {
        return leaveId;
    }

    public void setLeaveId(String leaveId) {
        this.leaveId = leaveId;
    }

    @ExcelField(title = "错误信息", type = 1, align = 2, sort = 150)
    public String getErrMsg() {
        return errMsg;
    }

    public void setErrMsg(String errMsg) {
        this.errMsg = errMsg;
    }
}